import express = require('express');
import jwt = require('jsonwebtoken');
import { config } from '../config/app.dev';

export let user = express.Router();


/* GET users listing. */
user.get('/', function (req, res, next) {
  let user = {
    name: '张三',
    role: ['admin']
  }
  req.session.token = jwt.sign(user, config.privateKey);
  res.send(JSON.stringify(user));
});

